home *** CD-ROM | disk | FTP | other *** search
- ##SUPPORT
- struct Gadget *create_getfile_gad(struct Gadget *gadlist, void *vi,
- struct GetFileGad *This_GFGad)
- {
- struct NewGadget ng;
-
- ng.ng_TextAttr = NULL;
- ng.ng_VisualInfo = vi;
- ng.ng_Flags = 0;
- ng.ng_UserData = This_GFGad->HitFunc;
- ng.ng_LeftEdge = This_GFGad->Left;
- ng.ng_Width = 21;
- ng.ng_Height = 14;
- ng.ng_GadgetText = "";
- ng.ng_TopEdge = This_GFGad->Top;
- ng.ng_GadgetID = This_GFGad->ID;
-
- This_GFGad->the_gad = gadlist= CreateGadget(GENERIC_KIND, gadlist, &ng,
- TAG_END);
-
- This_GFGad->the_gad->Flags |= GFLG_GADGIMAGE | GFLG_GADGHCOMP;
- This_GFGad->the_gad->Activation |= GACT_RELVERIFY;
- This_GFGad->the_gad->GadgetRender = (APTR)&GetFileImage;
- This_GFGad->the_gad->SelectRender = NULL;
-
- if(this_gad->Disabled)This_GFGad->the_gad->Flags |= GFLG_DISABLED;
-
- return(gadlist);
- }
-
-
- ##HEADER
-
- struct GetFileGad
- {
- int Left, Top, ID;
- BOOL Diabled,
- APTR HitFunc,
- struct Gadget *the_gad /*Allows you to OnGadget/OffGadget the gad!*/
- };
-
- struct Image GF_NormImage =
- {
- 0,0, /* X, Y */
- 20, 14, 2, /* Width, Height, Depth */
- &GF_NormImagedata[0], /* Image Data*/
- 3, 0, /* PlanePick, PlaneOnOff */
- NULL /* Next Image Structure*/
- };
-
-
- extern struct Gadget *create_getfile_gad( struct Gadget * ,void, struct GetFileGad *);
-
- ##EXTERN
- extern BOOL %oClicked( struct Window *, struct Gadget *, struct IE_Data *, struct IntuiMessage *)
- extern struct GetFileGad %oGF;
-
- ##OPENWND
- g=create_getfile_gad(g,(IE->ScreenData->Visual),%oGF);
-
- ##DATA
-
- struct GetFileGad %oGF
- {
- %x, %y, %i,
- %d,
- %oClicked,
- NULL
- };
-
- ##CHIP
- __chip USHORT GF_NormImagedata[] =
- {
- 0x0000, 0x1000,
- 0x0000, 0x3000,
- 0x003C, 0x3000,
- 0x0042, 0x3000,
- 0x0F81, 0x3000,
- 0x0FC1, 0x3000,
- 0x0C3F, 0x3000,
- 0x0C01, 0x3000,
- 0x0C01, 0x3000,
- 0x0C01, 0x3000,
- 0x0FFF, 0x3000,
- 0x0000, 0x3000,
- 0x0000, 0x3000,
- 0x7FFF, 0xF000,
-
- 0xFFFF, 0xE000,
- 0xC000, 0x0000,
- 0xC000, 0x0000,
- 0xC000, 0x0000,
- 0xC000, 0x0000,
- 0xC000, 0x0000,
- 0xC000, 0x0000,
- 0xC000, 0x0000,
- 0xC000, 0x0000,
- 0xC000, 0x0000,
- 0xC000, 0x0000,
- 0xC000, 0x0000,
- 0xC000, 0x0000,
- 0x8000, 0x0000,
-
- };
-
- ##end
-